/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Strategy;

import Interface.IChat;
import Packets.pkValue;
import StaticClass.ArrSocket;
import Thread.ThreadChat;
import java.net.Socket;
import javax.swing.JFrame;

/**
 *
 * @author Oho
 */
public class SI_Chat implements SIPack{

    public JFrame check(ThreadChat sk) {
        for (IChat temp : ArrSocket.ic) 
            if (temp.getTc() == sk) 
                return temp;
            return null;
    }
    public void ConvertPackage(pkValue vl, JFrame vic, String str) {
         for (IChat ic : ArrSocket.ic) {
                if (vic == ic) {
                    ic.txtInput.append(str +" : " + vl.getObj() + "\n");
                }
            }
    }
    
}
